<?php

namespace app\models;

use Yii;
use yii\base\Model;

/**
 * ContactForm is the model behind the contact form.
 */
class WeixinconfigForm extends Model
{
    public $businessid;//商户号
    public $appid;//AppID
    public $appsecret;//AppSecret
    public $ipakey;//IPA密钥
    public $cert;//证书cert
    public $certfile;
    public $disable;
    /**
     * @return array the validation rules.
     */
    public function rules()
    {
        return [
            [['businessid', 'appid','appsecret','ipakey','disable'], 'required'],
            [['businessid', 'appid', 'cert'], 'string', 'max' => 32],
            [['appsecret', 'ipakey'], 'string', 'max' => 256],
            ['certfile','file'],
        ];
    }

    /**
     * @return array customized attribute labels
     */
     public function attributeLabels()
     {
         return [
             'businessid' => '商户号',
             'appid' => 'AppID',
             'appsecret' => 'AppSecret',
             'ipakey' => 'IPA密钥',
             'cert' => '证书cert',
             'certfile' => '证书cert',
             'disable'=>'关闭此支付',
         ];
     }

}
